package com.luhuiguo.gwt.mvp.dispatcher.server.spring;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.luhuiguo.gwt.mvp.dispatcher.server.ActionHandler;
import com.luhuiguo.gwt.mvp.dispatcher.server.DefaultActionHandlerRegistry;

@Component
public class SpringActionHandlerRegistry extends DefaultActionHandlerRegistry {

    @Autowired
    public void setHandlers(List<ActionHandler<?, ?>> handlers) {
        for (ActionHandler<?, ?> actionHandler : handlers) {
            addHandler(actionHandler);
        }
    }
}
